package com.hnevc.mallserver3.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@TableName("t_comment")
@ApiModel(value = "Comment", description = "评论")
public class Comment {
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "ID")
    private Long id;
    @ApiModelProperty(value = "用户ID")
    private Long memberId;
    @ApiModelProperty(value = "商品ID")
    private Long goodsId;
    @ApiModelProperty(value = "评论内容")
    private String comment;
    @ApiModelProperty(value = "发表时间")
    @DateTimeFormat(pattern = "YYYY-mm-DD HH:MM:SS")
    @JsonFormat(pattern = "YYYY-mm-dd HH:MM:SS")
    private Date postdate;
}
